package com.uroad.jilinpda.modle;

import com.android.util.MyUtil;

/**
 * @author 40377
 * @version V1.0
 * @Date 2020/1/10 15:00
 * @Description: ${TODO}(用一句话描述该文件做什么)
 */
public class CpcSysInfoMDL {
    private String provider;//CPC发行方标识
    private String providerGbkValue;//
    private String cardId;//CPC卡id
    private String cardVersion;//当前版本号
    private String signedDate;//合同签署日期
    private String expiredDate;//合同过期日期
    private String reserve;//自定义
    private String hexEF01;
    private String hexCpcMac;
    private boolean bOK = false;
    private String battry;//电量 0:正常 1:低电
    private String is58Open;//5.8G开关 0:关闭 1:打开

    public CpcSysInfoMDL() {
    }

    public void setCpcInfo(String hexEF01) {
        if (hexEF01 != null && hexEF01.length() >= 50) {
            this.hexEF01 = hexEF01;
            this.provider = hexEF01.substring(0, 16);
            byte[] change = MyUtil.hexToBin(this.provider);
            this.providerGbkValue = MyUtil.byteToString(change, 0, 8);
            this.cardId = hexEF01.substring(16, 32);
            this.cardVersion = hexEF01.substring(32, 34);
            this.signedDate = hexEF01.substring(34, 42);
            this.expiredDate = hexEF01.substring(42, 50);
        }
    }

    public String getProvider() {
        return provider == null ? "" : provider;
    }

    public void setProvider(String provider) {
        this.provider = provider;
    }

    public String getProviderGbkValue() {
        return providerGbkValue == null ? "" : providerGbkValue;
    }

    public void setProviderGbkValue(String providerGbkValue) {
        this.providerGbkValue = providerGbkValue;
    }

    public String getCardId() {
        return cardId == null ? "00000000000000000000" : cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getCardVersion() {
        return cardVersion == null ? "" : cardVersion;
    }

    public void setCardVersion(String cardVersion) {
        this.cardVersion = cardVersion;
    }

    public String getSignedDate() {
        return signedDate == null ? "" : signedDate;
    }

    public void setSignedDate(String signedDate) {
        this.signedDate = signedDate;
    }

    public String getExpiredDate() {
        return expiredDate == null ? "" : expiredDate;
    }

    public void setExpiredDate(String expiredDate) {
        this.expiredDate = expiredDate;
    }

    public String getReserve() {
        return reserve == null ? "" : reserve;
    }

    public void setReserve(String reserve) {
        this.reserve = reserve;
    }

    public String getHexEF01() {
        return hexEF01 == null ? "" : hexEF01;
    }

    public void setHexEF01(String hexEF01) {
        this.hexEF01 = hexEF01;
    }

    public String getHexCpcMac() {
        return hexCpcMac == null ? "" : hexCpcMac;
    }

    public void setHexCpcMac(String hexCpcMac) {
        this.hexCpcMac = hexCpcMac;
    }

    public boolean isbOK() {
        return bOK;
    }

    public void setbOK(boolean bOK) {
        this.bOK = bOK;
    }

    public String getBattry() {
        return battry == null ? "" : battry;
    }

    public void setBattry(String battry) {
        this.battry = battry;
    }

    public String getIs58Open() {
        return is58Open == null ? "" : is58Open;
    }

    public void setIs58Open(String is58Open) {
        this.is58Open = is58Open;
    }
}
